< Prev(J) / Next(K) > / View :

Filename: /text/scalc/guide/validity.xhp

(bookmark: bm_id3156442)
values; limiting on input
limits; specifying value limits on input
permitted cell contents
data validity
validity
cells; validity
error messages; defining for incorrect input
actions in case of incorrect input
Help tips; defining text for cell input
comments;help text for cells
cells; defining input help
macros; running when incorrect input
data; validity check

値; 入力に対して制限する
制限; 入力時の値制限を指定する
許可されるセルの値
データの入力規則
入力規則
セル; 入力規則
エラーメッセージ; 入力が間違っているときのエラーメッセージを定義する
入力が間違っているときのアクション
ヒントヘルプ; セル入力用のテキストを定義する
コメント;セル用のヘルプテキスト
セル; 入力ヘルプを定義する
マクロ; 入力が間違っているときに実行する
データ; 入力規則を確認する

(variable: validity)Validity of Cell Contents
(variable: validity)セルの内容の入力規則(hd_id3156442.22)

For each cell, you can define entries to be valid. Invalid entries to a cell will be rejected.
セルごとにエントリが有効なことを定義できます。 セルに対して無効なエントリは却下されます。(par_id3156283.2)

Warning Icon 警告マーク The validity rule is activated when a new value is entered. If an invalid value has already been inserted into the cell, or if you insert a value in the cell either with drag-and-drop or by copying and pasting, the validity rule will not take effect.
入力規則は、新しい値が入力されるとアクティブになります。 無効な値がすでにセル内に挿入されている場合やドラッグ&ドロップまたはコピー&ペーストのいずれかでセルに値を入力する場合は、入力規則は適用されません。(par_id3145252.3)

Note Icon 注マーク You can choose Tools - Detective at any time and choose the command Mark Invalid Data to display which cells contain invalid values.
いつでも ツール - トレース を選択して、コマンド 無効な値を丸で囲む を選択し、どのセルが無効な値を含むかを表示できます。(par_id5174718.)

Using Cell Contents Validity
セルに入力規則を設定する(hd_id3155603.5)

  1. Select the cells for which you want to define a new validity rule.
    新しい入力規則を定義するセルを選択します。(par_id3155959.6)

  2. Choose Data - Validity.
    データ → 入力規則を選択します。 (par_id3148837.8)

  3. On the Criteria tab page, enter the conditions for new values entered into cells.
    条件 タブページでセルに入力される新しい値に対する条件を入力します。 (par_id3156020.9)

  4. In the Allow field, select an option.
    許可 フィールドでオプションを選択します。(par_id3159208.10)

  5. If you select "Whole Numbers", values such as "12.5" are not allowed. Choosing "Date" allows date information both in the local date format as well as in the form of a serial date. Similarly, the "Time" condition permits time values such as "12:00" or serial time numbers. "Text Length" stipulates that cells are allowed to contain text only.
    「整数」を選択すると、12.5 などの値は許可されません。 「日付」を選択すると、シリアル日付の書式に加えてローカルの日付書式の日付情報が許可されます。 同様に、「時間」条件は、12:00 などの時間値またはシリアル時間番号を許可します。 「テキストの長さ」は、そのセルに入力できるのはテキストだけであることを規定します。(par_id3153011.11)

    Select "List" to enter a list of valid entries.
    有効なエントリのリストを入力するには、「リスト」を選択します。(par_id9224829.)

  6. Select the next condition under Data. According to what you choose, additional options will be selectable.
    データ で次の条件を選択します。 選択内容によっては、追加オプションを選択できます。(par_id3149317.13)

After you have determined the conditions for cell validity, you can use the other two tab pages to create message boxes:
セルの入力規則の条件を決定したら、ほかの 2 つのタブページを使用してメッセージボックスを作成できます。(par_id3151389.15)

To display the error message, select Show error message when invalid values are entered.
エラーメッセージを表示するには、無効な値の入力時にエラーメッセージを表示する を選択します。 (par_id3149011.35)

(embed text/scalc/01/12120300.xhp#examplemakro : linkinfo)

Sample macro:
マクロ例(par_id3150752.16)

Function ExampleValidity(CellValue as String, TableCell as String)
Dim msg as string
msg = "Invalid value: " & "'" & CellValue & "'"
msg = msg & " in table: " & "'" & TableCell & "'"
MsgBox msg ,16,"Error message"
End Function(par_id5303635.)

(/embed text/scalc/01/12120300.xhp#examplemakro)

Note Icon 注マーク After changing the action for a cell on the Error Alert tab page and closing the dialog with OK, you must first select another cell before the change takes effect.
見出し エラーメッセージ でアクションを変更して OK ボタンでダイアログを閉じた場合、まず別のセルを選択して機能を有効にする必要があります。(par_id3148586.21)

Data - Validity
データ → 入力規則(par_id3154805.30)


< Prev / Next >